from Base import message, intersect, SS_VALID
from DRG import MDCC_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["15.1100","15.1200","15.1300","15.1900x001","15.2100","15.2200","15.2901","15.3x01","15.3x02","15.4x01","15.4x02","15.5x00","15.6x00","15.7x00","15.7x01","15.9x00x001","15.9x00x007","15.9x00x008","15.9x00x009","15.9x00x010"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合CD2入组条件，匹配规则：主手术匹配')

    if MDCC_DRG.CD29_group(record):
      return 'CD29'
        
    return 'CD2'
  else:
    return ''
    
